/**
 * 
 */
package com.cp16.tss.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author GiangHN
 * @version 1.0
 * @since 01/01/2014
 * 
 */


@Entity
@Table(name = "REQUIREMENT")
public class Requirement implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "REQ_ID")
	private int requirementId;
	@Column(name = "REQ_CONTENT")
	private String requirementContent;
	@ManyToOne
	private Customer customer;
	@ManyToOne
	private Service service;
	@OneToMany(cascade = CascadeType.ALL)
	private Collection<Device> deviceList = new ArrayList<Device>();
	@OneToMany(cascade=CascadeType.ALL)
	private Collection<Phone> phoneList = new ArrayList<Phone>();
	@OneToOne
	private Bill bill;
	@Temporal(TemporalType.DATE)
	private Date dateReq;
	@Temporal(TemporalType.DATE)
	private Date deadline;
	@Temporal(TemporalType.DATE)
	private Date dateHandOver;
	@Column(name="STATUS")
	private String status;

	/**
	 * @return the requirementId
	 */
	public int getRequirementId() {
		return requirementId;
	}

	/**
	 * @param requirementId
	 *            the requirementId to set
	 */
	public void setRequirementId(int requirementId) {
		this.requirementId = requirementId;
	}

	/**
	 * @return the requirementContent
	 */
	public String getRequirementContent() {
		return requirementContent;
	}

	/**
	 * @param requirementContent
	 *            the requirementContent to set
	 */
	public void setRequirementContent(String requirementContent) {
		this.requirementContent = requirementContent;
	}

	/**
	 * @return the customer
	 */
	public Customer getCustomer() {
		return customer;
	}

	/**
	 * @param customer
	 *            the customer to set
	 */
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	/**
	 * @return the service
	 */
	public Service getService() {
		return service;
	}

	/**
	 * @param service the service to set
	 */
	public void setService(Service service) {
		this.service = service;
	}

	/**
	 * @return the deviceList
	 */
	public Collection<Device> getDeviceList() {
		return deviceList;
	}

	/**
	 * @param deviceList
	 *            the deviceList to set
	 */
	public void setDeviceList(Collection<Device> deviceList) {
		this.deviceList = deviceList;
	}

	/**
	 * @return the bill
	 */
	public Bill getBill() {
		return bill;
	}

	/**
	 * @param bill
	 *            the bill to set
	 */
	public void setBill(Bill bill) {
		this.bill = bill;
	}

	/**
	 * @return the dateReq
	 */
	public Date getDateReq() {
		return dateReq;
	}

	/**
	 * @param dateReq
	 *            the dateReq to set
	 */
	public void setDateReq(Date dateReq) {
		this.dateReq = dateReq;
	}

	/**
	 * @return the dateHandOver
	 */
	public Date getDateHandOver() {
		return dateHandOver;
	}

	/**
	 * @param dateHandOver
	 *            the dateHandOver to set
	 */
	public void setDateHandOver(Date dateHandOver) {
		this.dateHandOver = dateHandOver;
	}

	/**
	 * @return the phoneList
	 */
	public Collection<Phone> getPhoneList() {
		return phoneList;
	}

	/**
	 * @param phoneList the phoneList to set
	 */
	public void setPhoneList(Collection<Phone> phoneList) {
		this.phoneList = phoneList;
	}

	/**
	 * @return the deadline
	 */
	public Date getDeadline() {
		return deadline;
	}

	/**
	 * @param deadline the deadline to set
	 */
	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

}
